/*
 * Copyright (c) 2017. danlu.com Co.Ltd. All rights reserved.
 */

package cn.com.dhc.danlu.dlware.api;

import com.danlu.dlsms.model.pub.res.MessageListResponse;
import com.danlu.dlsms.model.pub.res.MsgCountResponse;
import com.danlu.dlsms.model.pub.res.MsgNewestOneMessageResponse;

import cn.com.hd.mall.web.webservices.entity.BaseResponse;
import cn.com.hd.mall.web.webservices.entity.freedom.response.base.BaseResponseWrapper;
import cn.com.hd.mall.web.webservices.entity.request.pushmsg.GetUnreadCountRequest;
import cn.com.hd.mall.web.webservices.entity.request.pushmsg.MessageListRequest;
import cn.com.hd.mall.web.webservices.entity.request.pushmsg.NewestOneMsg;
import cn.com.hd.mall.web.webservices.entity.request.pushmsg.SetMsgStatus;
import cn.com.hd.mall.web.webservices.entity.utils.DanluConstants;
import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Observable;

/**
 * author: 李一方(<a href="mailto:liyifang@danlu.com">liyifang@danlu.com</a>)<br/>
 * version: 1.0.0<br/>
 * since: 2017-02-06 17:05:45<br/>
 *
 * <p>
 * 消息 API.
 * </p>
 */
public interface MsgApi {
    /**
     * 获取未读消息数目
     */
    @POST(DanluConstants.Service.GET_UNREAD_COUNT)
    Observable<BaseResponseWrapper<MsgCountResponse>> getUnreadMsgCount(@Body GetUnreadCountRequest request);

    /**
     * 获取指定消息类型的最新一条消息
     */
    @POST(DanluConstants.Service.GET_NEWEST_MSG)
    Observable<BaseResponseWrapper<MsgNewestOneMessageResponse>> getNewestOneMsg(@Body NewestOneMsg request);

    /**
     * 将指定消息类型中所有消息置为已读
     */
    @POST(DanluConstants.Service.SET_MSG_STATUS)
    Observable<BaseResponseWrapper<BaseResponse>> setMsgStatus(@Body SetMsgStatus request);

    /**
     * 获取消息列表
     */
    @POST(DanluConstants.Service.GET_MSG_LIST)
    Observable<BaseResponseWrapper<MessageListResponse>> getMessageList(@Body MessageListRequest request);
}